package com.fzsf.drawingboard.bluetooth.royole;

import android.bluetooth.BluetoothDevice;
import android.util.Log;
import android.widget.Toast;

import com.fzsf.drawingboard.app.MyApplication;
import com.fzsf.drawingboard.bluetooth.IFZWritingPadCallBackListener;


/**
 * Created by Taijl on 2017/9/7.
 */

public class FZWritingPad_RYHelper{
    private static FZWritingPad_RYHelper padHelper;

    public static FZWritingPad_RYHelper getPadHelper() {
        if (null == padHelper) {
            padHelper = new FZWritingPad_RYHelper();
        }
        return padHelper;
    }

    private IFZWritingPadCallBackListener simpleListener;

    public void startScan() {
    }

    public void stopScan() {
    }

    /**
     * 连接设备
     *
     * @param device 通过蓝牙的设备对象（必须先扫描才能得到）
     *               1
     */
    public void connectDevice(BluetoothDevice device) {
    }

    /**
     * 连接设备
     *
     * @param deviceName 通过设备的名称连接
     */
    public void connectDevice(String deviceName) {
    }

    /**
     * 开始书写（切换到实时模式）
     */
    public void startWrite() {
    }

    /**
     * 获取连接状态
     */
    public boolean getState() {
        return false;
    }

    /**
     * 切换工作模式
     *
     * @param workMode
     */
    public void switchWorkMode(int workMode) {
    }

    /**
     * 断开连接
     */
    public void disConnect() {
    }


    public void setSimpleListener(IFZWritingPadCallBackListener simpleListener) {
        this.simpleListener = simpleListener;
    }

    public static void showText(String txt) {
        Toast.makeText(MyApplication.getInstance(), txt, Toast.LENGTH_SHORT).show();
        logText(txt);
    }

    public static void logText(String txt) {
        Log.e(FZWritingPad_RYHelper.class.getSimpleName(), txt);
    }

}
